# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=yubioath-desktop
pkgver=5.1.0
pkgrel=0
pkgdesc="Yubico Authenticator for Desktop"
url="https://github.com/Yubico/yubioath-desktop"
arch="all !armhf" # missing qt5-qtquickcontrols2
license="BSD-2-Clause"
depends="py3-pyotherside py3-ykman ccid"
makedepends="qt5-qtquickcontrols2-dev qt5-qtmultimedia-dev"
source="https://github.com/Yubico/yubioath-desktop/archive/yubioath-desktop-$pkgver.tar.gz
	0001-Install-path.patch
	"
builddir="$srcdir/$pkgname-$pkgname-$pkgver"
options="!check" # No tests

build() {
	qmake-qt5 . \
		PREFIX=/usr \
		QMAKE_CFLAGS_RELEASE="$CFLAGS" \
		QMAKE_CXXFLAGS_RELEASE="$CXXFLAGS"

	make
}

package() {
	make INSTALL_ROOT="$pkgdir" install

	install -Dm644 resources/icons/com.yubico.yubioath.svg \
		"$pkgdir"/usr/share/pixmaps/com.yubico.yubioath.svg
	install -Dm755 resources/com.yubico.yubioath.desktop \
		"$pkgdir"/usr/share/applications/com.yubico.yubioath.desktop
	install -Dm755 resources/com.yubico.yubioath.appdata.xml \
		"$pkgdir"/usr/share/metainfo/com.yubico.yubioath.appdata.xml
}

sha512sums="
152e27fca3c082c996c96fb05ed66781a52a47f30d8c5649d43937cf87c566f09c1fcb6afd65402b5f7fbe2a1f71872f10c8b456bd8a9b240c360018defd48c9  yubioath-desktop-5.1.0.tar.gz
44035f3d4ac20d586495a951790f89ac852f2998d412655ee92d1aabf8903937ce51aed61380c9e3e3ed46addba3591ba6ff9a60943a4d7b3c6b497eb71ff37c  0001-Install-path.patch
"
